package example

import (
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type VideoWorkRouter struct {}

// InitVideoWorkRouter 初始化 videoWork表 路由信息
func (s *VideoWorkRouter) InitVideoWorkRouter(Router *gin.RouterGroup,PublicRouter *gin.RouterGroup) {
	videoWorkRouter := Router.Group("videoWork").Use(middleware.OperationRecord())
	videoWorkRouterWithoutRecord := Router.Group("videoWork")
	videoWorkRouterWithoutAuth := PublicRouter.Group("videoWork")
	{
		videoWorkRouter.POST("createVideoWork", videoWorkApi.CreateVideoWork)   // 新建videoWork表
		videoWorkRouter.DELETE("deleteVideoWork", videoWorkApi.DeleteVideoWork) // 删除videoWork表
		videoWorkRouter.DELETE("deleteVideoWorkByIds", videoWorkApi.DeleteVideoWorkByIds) // 批量删除videoWork表
		videoWorkRouter.PUT("updateVideoWork", videoWorkApi.UpdateVideoWork)    // 更新videoWork表
	}
	{
		videoWorkRouterWithoutRecord.GET("findVideoWork", videoWorkApi.FindVideoWork)        // 根据ID获取videoWork表
		videoWorkRouterWithoutRecord.GET("getVideoWorkList", videoWorkApi.GetVideoWorkList)  // 获取videoWork表列表
	}
	{
	    videoWorkRouterWithoutAuth.GET("getVideoWorkPublic", videoWorkApi.GetVideoWorkPublic)  // videoWork表开放接口
	}
}
